package org.mtmi.ui.controls.midi;

import java.util.ArrayList;
import java.util.List;

import org.mtmi.ui.actions.ActionFactory;
import org.mtmi.ui.actions.IAction;
import org.mtmi.ui.controls.edits.KeyboardControlEditor;
import org.mtmi.ui.controls.edits.KeyboardTransposeConnector;
import org.mtmi.ui.edit.AbstractSourceControlConnector;

public class MidiKeyboardControlEditor extends KeyboardControlEditor
{
	
	public MidiKeyboardControlEditor( MidiKeyboard kb ) {
		super(kb);
	}
	
	@Override
	public MidiKeyboard getKeyboard() {
		return (MidiKeyboard)super.getKeyboard();
	}

	@Override
	public List<IAction> getControlActions() {
		List<IAction> actions = super.getControlActions();
		actions.add( ActionFactory.MIDI_CHANGE_OUTPUT );
		actions.add( ActionFactory.MIDI_CHANGE_CHANNEL );
		actions.add( ActionFactory.MIDI_CHANGE_INSTRUMENT );
		actions.add( ActionFactory.MIDI_CHANGE_VELOCITY );
		return actions;
	}
	
	@Override
	public List<AbstractSourceControlConnector> getControlConnectors() {
		List<AbstractSourceControlConnector> con = super.getControlConnectors();
		con.add( new MidiKeyboardInstrumentConnector( getKeyboard(), 0 ) );
		return con;
	}
}
